import {createApp} from "vue";
import Main from './Main.vue'
import ElementPlus from 'element-plus'
import 'element-plus/theme-chalk/index.css'
import {reactive, provide} from 'vue';
// 引入 路由的两个函数 createRouter createWebHashHistory
import {createRouter, createWebHashHistory} from "vue-router";
import Home from '@/views/Home.vue'
import User from "@/views/User.vue"


var app = createApp(Main);
app.use(ElementPlus)

// 配置静态路由表
const routes=[
    {
        path:'/',
        component:Home,
    },
    {
        path:'/user',
        component:User,
        props:true,
    }
]
// 创建路由对象
const router = createRouter({
    history:createWebHashHistory(),
    routes,linkActiveClass:'active'
})


app.use(router)

app.use(router).mount("#app");






